<div bsModal #actionModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="actionModal" aria-hidden="true"
  [config]="{backdrop: 'static'}">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #editForm="ngForm" novalidate (ngSubmit)="save()">

        <div class="modal-header">
          <h4 class="modal-title"> 
            <span>批量操作</span> 
          </h4>
          <button type="button" class="close" (click)="close()" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>

        <div class="modal-body" style="padding-top: 0;"> 
          <div  >
            <div class="m-demo" data-code-preview="true" data-code-html="true" data-code-js="false">
              <div class="m-demo__preview text-center">
                <!-- <selectLocation #selectloc [(location)]="releaseStockBill.positionId"></selectLocation> -->
                <div class="row">
                  
                   <div class="col-md-4">
                    <div class="form-group">
                      <select #areaCombobox name="area" class="form-control" [(ngModel)]="areaId" [attr.data-live-search]="true" jq-plugin="selectpicker"
                        (change)="loadShelfs()" title="选择库房"> 
                        <option *ngFor="let area of areas" [value]="area.id">{{area.name}}</option>
                      </select>
                    </div>
                  </div>
                  <div class="col-md-4">
                    <div class="form-group">
                      <select #shelfCombobox name="shelf" class="form-control" [(ngModel)]="shelfId"  [attr.data-live-search]="true"
                      (change)="loadPositions()" title="选择档案柜"> 
                        <option *ngFor="let shelf of shelfs" [value]="shelf.id">{{shelf.name}}</option>
                      </select>
                    </div>
                  </div>
                  <div class="col-md-4">
                    <div class="form-group">
                      <select #positionCombobox name="position" class="form-control" [(ngModel)]="positionId" jq-plugin="selectpicker" [attr.data-live-search]="true"
                      title="选择架位"> 
                        <option *ngFor="let position of positions" [value]="position.id">{{position.name}}</option>
                      </select>
                    </div>
                  </div> 
                </div>
              </div>
            </div>
            <div class="m-demo" data-code-preview="true" data-code-html="true" data-code-js="false">
                <div class="m-demo__preview text-left">
                  <label>备注</label> 
                          <textarea class="form-control" style="resize:none;"  type="text" name="remarks" [ngClass]="{'edited': remarks}"
                          [(ngModel)]="remarks"></textarea>
                </div>
              </div>
          </div>

           
        </div>

        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">{{l("Cancel")}}</button>
          <button  *ngIf="!isUpdate"  type="submit" class="btn btn-success" [disabled]="!positionId " [buttonBusy]="saving" [busyText]="'入库中...'">
            <i class="fa fa-check-circle"></i>
            <span>入库</span>
          </button>
          <button *ngIf="isUpdate" type="button"(click)="update()"  class="btn btn-success"  [disabled]="!positionId " [buttonBusy]="saving" [busyText]="'保存中...'">
            <i class="fa fa-save"></i>
            <span>保存</span>
          </button>
        </div>

      </form>

    </div>
  </div>
</div>
